package com.kk.springcloud.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;


/**
 * @author o_o
 */
@RestController
public class OrderZkController {

    private static final String PAYMENT_URL = "http://cloud-payment-service-8008";
    @Autowired
    private RestTemplate restTemplate;

    @GetMapping("/order/getport")
    public String paymenInfo() {
        String paymentInfo = restTemplate.getForObject(PAYMENT_URL + "/getport", String.class);
        return paymentInfo;

    }

}
